package MementoPattern.demo2;

import lombok.Data;

/**
 * @author： pang-yun
 * @date： 2022-01-06 10:52
 * 功能目的 ：用于
 */
@Data
public class GameRole {
    private int id;
    private int attack;
    private int defence;

    public GameRole(int id, int attack, int defence) {
        this.id = id;
        this.attack = attack;
        this.defence = defence;
        new Memento(id,attack);
    }

    public void setAttack(int attack) {
        this.attack = attack;
        new Memento(id,attack);
    }
}
